import request from '@/utils/request'

/**
 * 新增
 * @param {Object} data
 * @returns
 */
export function addPointType(data) {
  return request({
    url: '/tissue/positionType/addPositionType',
    headers: { repeatSubmit: false },
    method: 'post',
    data
  })
}

/**
 * 修改
 * @param {Object} data
 * @returns
 */
export function updatePointType(data) {
  return request({
    url: '/tissue/positionType/updatePositionType',
    method: 'post',
    data
  })
}

/**
 * 管理
 * @param {Object} params
 * @returns
 */
export function getPointTypeList(params) {
  return request({
    url: '/tissue/positionType/positionConditions',
    method: 'get',
    params
  })
}

/**
 * 禁、启用
 * @param {Object} data
 * @returns
 */
export function disablePointType(data) {
  data.enable = data.enable == '1' ? '0' : '1'

  return request({
    url: '/tissue/positionType/updatePositionTypeStatus',
    method: 'post',
    data
  })
}
